<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <script th:src="@{/js/jquery-2.1.4.min.js}"></script>
</head>
<body>
<form id="upload" enctype="multipart/form-data" method="post" action="/uploadAndDownload/uploadFileAction">
    <input type="file" name="uploadFile"/>
    <input type="hidden" name="id" value="12"/>
    <input type="button" value="文件上传" οnclick="doUpload()"/>
</form>
<input type="button" value="下载文件" οnclick="doDownload()"/>
<form id="download" method="post" action="/uploadAndDownload/downloadFileAction">
</form>

<a href="/upload/app/hello">点我</a>
<a href="/upload/app/async">点我</a>
<h1> </h1>
<a href="/upload/app/add"></a>
<button type="button" onmouseenter="doTime()">时间</button>
<p id="demo"></p>
<script type="text/javascript">
    function doUpload() {
        var upl = document.getElementById("upload");
        upl.submit();
    }
    function doDownload() {
        var upl = document.getElementById("download");
        upl.submit();
    }
    function  doTime(){
        alert("hello")
        document.getElementById("demo").innerHTML=Date();
    }
</script>
</body>
</html>